/*
 * ModeloARPA.h
 *
 *  Created on: 07/12/2014
 *      Author: root
 */

#ifndef MODELOARPA_H_
#define MODELOARPA_H_
#include <string>
#include "vectorTrigrama.h"
#include <stdlib.h>
#include <stdio.h>
#include <map>


class ModeloARPA {
public:
	ModeloARPA();
	virtual ~ModeloARPA();

	static std::map<std::string, float*> estructuraUnigramas;

	static std::map<vectorBigrama, float*> estructuraBigramas;

	static std::map<vectorTrigrama, float> estructuraTrigramas;

	static float obtenerPTrigrama(vectorTrigrama trigramaBuscado);

	static float* obtenerDatosBigrama(vectorBigrama bigramaBuscado);

	static float* obtenerDatosUnigrama(std::string terminoBuscado);

	static void agregarTrigramaAlModelo(std::string term1,std::string term2,std::string term3);

	static const  std::string* agregarUnigrama(std::string termino, float prob,float boff);

	static const vectorBigrama* agregarBigramaAEstructura(std::string unigram1,std::string unigram2, float prob,float boff);

	static const vectorTrigrama* agregarTrigramaAEstructura(std::string unigram1,std::string unigram2,std::string unigram3, float prob);

		static const std::string* obtenerHashUnigrama(std::string unigram);

		static const vectorBigrama* obtenerHashBigrama(std::string unigram1,std::string unigram2);

		static const vectorTrigrama* obtenerHashTrigrama(std::string unigram1,std::string unigram2,std::string unigram3);

private:
		static const vectorBigrama* agregarBigrama(vectorBigrama bigrama, float prob,float boff);

				static const vectorTrigrama* agregarTrigrama(vectorTrigrama trigrama, float prob);

};

#endif /* MODELOARPA_H_ */
